<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ page contentType="text/html; charset=utf-8" %>
<%@ include file="/commons/taglibs.jsp" %>
<head>

	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

<%@ include file="/commons/css_js_head.jsp" %>

<title>系统公告</title>
<script type="text/javascript">
//复写Url
doListUrl = "${ctx }/permission/systemMessageAction!doList.ts";
doAddBeforeUrl = "${ctx }/main/permission/SystemMessageAdd.jsp";
doUpdateBeforeUrl = "${ctx }/permission/systemMessageAction!doFindById.ts";
doDelUrl="${ctx }/permission/systemMessageAction!doDelete.ts";
		
//添加之前
function doAddBefore(){
   var _form = document.forms[0];
   if(doAddBeforeUrl == ''){
   	alert('请设置正确的URL!');
   	return false;
   }

   _form.action = doAddBeforeUrl;
   _form.submit();
}

//更新之前 
function doUpdateBefore(pkId){
   var _form = document.forms[0];
   if(doUpdateBeforeUrl == ''){
   	alert('请设置正确的URL!');
   	return false;
   }

   _form.action = doUpdateBeforeUrl+"?smId="+pkId;
   _form.submit();
}

//删除
function doDel(pkId){
   var _form = document.forms[0];
   if(doDelUrl == ''){
   	alert('请设置正确的URL!');
   	return false;
   }
   
   if(confirm("您确定删除该公告吗？")){
   	   _form.action = doDelUrl+"?smId="+pkId;
   	   _form.submit();
   }	
}
</script>

</head>
<body style="overflow-x:hidden">

<!-- 标题 -->
<div class="mTitle">
  <span class="hidsearch"><a href="javascript:void(0)" onclick="return chg('searchList');" id="ImgArrow">
  	<img src="${ctx}/images/icon_up.gif" id ="imgButton" /></a>
  </span>
  <b class="bbig">公告查询</b><a href="#" onclick="javascript:doAddBefore();">
		公告发布
		</a>
   </div>

<!-- 查询条件 -->
<div class="searchBar" id="searchList" style="display:block;">
<s:form action="/permission/systemMessageAction!doList.ts" id="form1" method="post" theme="simple">
  <table class="searchTable">
	  <tr>
		<th>公告标题：</th>
	    <td>
	    	<s:textfield name="title" theme="simple"></s:textfield>
	    </td>
		<th>发布时间：</th>
	    <td>
		    <s:textfield name="operatorDateStart" id="operatorDateStart" cssClass="Wdate" size="12" onfocus="WdatePicker({el:'operatorDateStart',dateFmt:'yyyy-MM-dd'})" readonly="true" theme="simple" />
		    <i>至</i>
		    <s:textfield name="operatorDateEnd" id="operatorDateEnd" cssClass="Wdate" size="12" onfocus="WdatePicker({el:'operatorDateEnd',dateFmt:'yyyy-MM-dd'})" readonly="true" theme="simple" />
	    </td>
	    <td>
	    	<input name="btn_query" type="button" class="btn" value="查询" onclick="doQuery()" />
	    	<input name="btn_reset" type="button" class="btn" value="清空查询条件" onclick="doReset()" />
	    </td>
	  </tr>
  </table>
</s:form>
</div>

<!-- start 显示内容 -->
<aa:zone name="zoneList">
<div class="mainList">

<table class="listTable">
  <tr>
		<th  width="20%" class="find_td01 fs14 fb" >公告标题</th>
		<th  width="7%" class="find_td01 fs14 fb" >开始时间</th>
		<th  width="7%" class="find_td01 fs14 fb" >结束时间</th>
		<th  width="6%" class="find_td01 fs14 fb" >发布人</th>
		<th  width="10%" class="find_td01 fs14 fb" >发布时间</th>
		<th  width="8%" class="find_td01 fs14 fb" >修改人</th>
		<th  width="10%" class="find_td01 fs14 fb" >修改时间</th>
		<th >操作</th>
		
  </tr>
<c:forEach var="systemMessage" items="${voList}">
	<tr align=center>
	    
		<td >${systemMessage.title}</td>
		<td ><fmt:formatDate value="${systemMessage.startDate}" pattern="yyyy-MM-dd" /></td>
		<td ><fmt:formatDate value="${systemMessage.endDate}" pattern="yyyy-MM-dd" /></td>
		<td >${systemMessage.operatorUser}</td>
		<td ><fmt:formatDate value="${systemMessage.operatorDate}" pattern="yyyy-MM-dd hh:mm:ss" /></td>
		<td >${systemMessage.editUser}</td>
		<td ><fmt:formatDate value="${systemMessage.editDate}" pattern="yyyy-MM-dd hh:mm:ss" /></td>
		
		<td >
			<a href="${ctx}/permission/systemMessageAction!doView.ts?smId=${systemMessage.smId }&keepThis=true&amp;TB_iframe=true&amp;height=430&amp;width=500&amp;modal=true" class="thickbox"><span class="icon_listOK">&nbsp;</span>查看</a>
			<a href="javascript:void(null)" onclick="doUpdateBefore('${systemMessage.smId}');"><span class="icon_edit">&nbsp;</span>修改</a>
			<a href="javascript:void(null)" onclick="doDel('${systemMessage.smId}');"><span class="icon_del">&nbsp;</span>删除</a>
		</td>
		
	</tr>
</c:forEach>
</table>
</div>
</aa:zone>
<!-- end 显示内容 -->

<!-- 分页区域  -->
<div class="Toolbar">
	<div class="listTool">
		<div class="page">
		
		</div>
	</div>
</div>

<script type="text/javascript">
ajaxAnywhere.formName = "form1";
ajaxAnywhere.getZonesToReload = function() {
    return "zoneList";
}
</script>


</body>
</html>
